@extends('admin.layout.layout', ['row' => @$page])

@section('contain')


    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green-sharp bold uppercase">{{ @$page['title'] }}</span>
            </div>
            <div class="actions">
                <div class="item">
                    <a href="/{{ request()->path() }}/create" class="btn btn-sm btn-primary">新增</a>
                </div>
            </div>
        </div>

        <div>
            <table class="table table-s1">
                <thead>
                <tr>
                    <th>{{ ts('DISTRIBUTORID') }}</th>
                    <th>{{ ts('COMPANYNAME') }}</th>
                    <th>{{ ts('CONTACTPERSON') }}</th>
                    <th>{{ ts('CONTACTINFORMATION') }}</th>
                    <th>{{ ts('STATUS') }}</th>
                    <th style="width:270px">{{ ts('OPTION') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $v)
                    <tr class="item-list">
                        <td>
                            <div class="truncated-3">{{ @$v->unique_id }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ @$v->company_name }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ @$v->first_name }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ $v->phone_number }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ $v->status ? ts('ACTIVE') : ts('DEACTIVE') }}</div>
                        </td>
                        <td>
                            <a class="btn btn-success btn-sm" href='/{{ request()->path() }}/{{ $v->id }}' target="_blank">{{ ts('VIEW') }}</a>
                            <a class="btn btn-success btn-sm" href='/{{ request()->path() }}/{{ $v->id }}' target="_blank">{{ ts('dealer') }}</a>
                            <a class="btn btn-primary btn-sm" href='/{{ request()->path() }}/{{ $v->id }}' target="_blank">业绩</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="my-3">
                {{ $data->appends(request()->input())->links() }}
            </div>
        </div>

    </div>


@endsection

@section('script')
@endsection